#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
@Description: 文件描述
@Author: winni
@Date：2021/07/24 22:51:13
"""
from interface_homework.api.base_api import BaseApi


class HttpApi(BaseApi):
    def get_method(self, params=None):
        """
        :param params: 请求头参数
        :return: 返回响应结果
        """
        if params:
            # 带params的query请求
            res = self._send(method='GET', url="/get", params=params)
        else:
            # 普通的get请求
            res = self._send(method='GET', url="/get")
        return res

    def post_method(self, **kwargs):
        res = self._send(method='POST', url='/post', **kwargs)
        return res
